Update Espressif Examples and Libraries #7392
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is primarily an update to the Espressif test and benchmark examples.
The updates to the client and server will be addressed in a separate PR.
I don't consider the examples "done", but I had to come up with a stopping point someplace, so here it is.
General
Post Quantum KEM PQ Support
user_settings.h
. Disabled by default.wolfCrypt settings
XMALLOC
conditionalwc_debug_pvPortMalloc()
to print the number of bytes attempted to allocate at failure time.Benchmark updates
CONFIG_NEWLIB_NANO_FORMAT=1
(enabling this causes needed 64bit support to not be available, resulting in no numeric output).WOLFSSL_BENCHMARK_TIMER_DEBUG
TLS Client/Server Examples
./components/wolfssl/include/user_settings.h
./examples/client
)WOLFSSL_ERROR_WANT_READ
andWOLFSSL_ERROR_WANT_WRITE
Espressif Utilities
esp_err_t
instead ofint
), add debug messages.esp_sdk_mem_lib
for memory related functions and debugging tools.esp_sdk_time_lib
to pull time functions into common library rather than separate code in each example.esp_sdk_wifi_lib
to pull WiFi functions into common library rather than separate code in each example.The Espressif TLS client and server applications have not been updated to use the new time and wifi libraries at this time.
PROTOCOL_EXAMPLES
for ESP-IDF < v5.0.Espressif Examples
template
ESP32 example VisualGDB project to use new ESP-IDF v5.2 by default.IDF_PATH
is missing, causing a more clear error when usingcmake
.make
andcmake
support towolfssl_benchmark
andwolfssl_test
.sdkconfig
defaults for various memory optimization settings. Note app may still use RTOS stack / tasks.testAll.sh
andtestMonitor.sh
scripts to aid in running wolfcrypt tests on multiple Espressif devices.wolfssl_test
Espressif example, with known problems (e.g. insufficient default memory) flagged inuser_settings.h
.file(GLOB EXCLUDE
...] instead of [file(GLOB_RECURSE EXCLUDE
...] during build.VERBOSE_COMPONENT_MESSAGES
(off be default) to print fewer messages.main.c
. Important for ESP8266 targets to output console.TLS_SMP_SERVER_TASK_WORDS
vsTLS_SMP_SERVER_TASK_BYTES
macro.Fixes zd# n/a
Testing
How did you test?
Tested on 9 different Espressif SoC devices. Minimal testing on non-Espressif builds. Used the new 'testAll.sh' and 'testMonitor.sh' scripts.
Although disabled by default, there was extensive testing of ESP32 and ESP8266 PQ PEM from Espressif client to Espressif server, from Espressif client to Linux server, and from Linux client to Espressif listening TLS server. Linux versions used the
5.7.0
master release to ensure these Espressif examples work with that latest release.Here are the 9x test results from my test jig
Checklist